import axios from "axios";

axios.defaults.baseURL = "http://47.102.145.189:8009";
axios.defaults.timeout = 60000;

axios.interceptors.request.use((config)=>{
    const token = sessionStorage.getItem('token');
    if(token){
        config.headers.authorization = `${token}`
    } 
    return config;
},(error)=>{
    return Promise.reject(error)
})

axios.interceptors.response.use((response)=>{
    return response;
},(error)=>{
    return Promise.reject(error)
})
export default axios;